package cn.tsvtc.shop.service;

import cn.tsvtc.shop.pojo.RegisterEmailUser;
import cn.tsvtc.shop.pojo.RegisterPhoneUser;
import org.springframework.stereotype.Service;

/**
 * @Author Athena
 * @Date 2020/10/29 17:17
 * @Version 1.0
 * @Description 验证码服务
 */

public interface CodeService {

    /**
     * 发送短信验证码
     * @param user
     * @return Boolean
     */
    public Boolean sendSmsCode(String phone);

    /**
     * 发送邮件验证码
     * @param user
     * @return Boolean
     */
    public Boolean sendEmailCode(RegisterEmailUser user);

    /**
     * 激活邮箱注册的账户
     * @param email,code
     * @return
     */
    public Boolean activeUser(String email,String code);
}
